package com.example.healthcondition.controller;

import com.example.healthcondition.entity.ExerciseSuggestions;
import com.example.healthcondition.services.ExerciseSuggestionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/login/home/exerciseSuggestions")
public class ExerciseSuggestionsController {

    @Autowired
    private ExerciseSuggestionsService exerciseSuggestionsService;

    @PostMapping("/generate/{userId}")
    public ExerciseSuggestions generateExerciseSuggestions(@PathVariable Integer userId) {
        return exerciseSuggestionsService.generateExerciseSuggestions(userId);
    }
}
